package com.board.service;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.board.dto.*;
import com.board.entity.SeatEatOrder;
import com.board.form.*;
import com.board.param.*;
import com.board.util.PageInfo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 膳食系统-堂食订单表 服务类
 * </p>
 *
 * @author 小叶
 * @since 2024年04月04日
 */
public interface SeatEatOrderService extends IService<SeatEatOrder> {


    //用户生成堂食订单
    Object createOrder(SeatOrderParam toBean, Integer userId);

    //用户条件查询堂食订单
    List<SeatOrderDto> userFindOrder(UserFindSeatOrderParam toBean, Integer userId);

    //用户手动取消订单
    Object cancelOrder(CancelOrderForm form, Integer userId);

    //用户发起支付订单
    String payOrder(PayOrderForm form, Integer userId) throws Exception;

    //支付宝的回调接口
    void orderCallBack(Map<String, String> params) throws AlipayApiException;

    //用户取餐
    Object userGetFood(String orderNum, Integer userId,Integer orderType);

    //用户提交退款申请
    Object refund(OrderRefundParam param, Integer userId);

    //用户申请平台介入
    Object applyPlatform(ApplyOrderParam param, Integer userId);

    //用户再来一份订单
    Object onceMoreOrder(OrdernumTypeParam param, Integer userId);

    //商家查询订单
    PageInfo<SeatOrderDto> storeFindOrder(StoreFindOrderForm form, Integer storeId);

    //商家接受订单
    Object acceptOrder(OrdernumTypeForm form, Integer storeId);

    //商家拒绝接单
    Object storeRefuseStore(OrderRefuseParam toBean, Integer storeId);

    //商家出餐完成
    OutOrderDto storeOutOrder(String orderNum, Integer storeId);

    //商家审核退款
    Object storeCheckRefund(StoreCheckParam param, Integer storeId);

    //平台查询订单
    PageInfo<PlatformFindOrderDto> platformFindOrder(PlatformFindParam toBean);

    //平台审核订单
    Object platformCheckOrder(PlatformCheckOrderForm form, int checkState) throws AlipayApiException;
}
